A = @
CFLAGS=	-g
CC=		gcc
LIBS= -I./
LDFLAGS=
RM = rm -rf
MV = mv
MKDR = mkdir -p

db:
	export LANG=en_US.UTF-8;
	$(MKDR) ./db_backup
	$(RM) ./db_backup/*
	[ -f ./data/ip2region.db ] && $(MV) ./data/ip2region.db ./db_backup/
	java -jar ./maker/java/dbMaker-1.2.2.jar -src ./data/ip.merge.txt -region ./data/global_region.csv -dst ./data/
	
.PHONY: db